package com.lxc.domain.docker.model.aggregates;

import com.lxc.domain.docker.model.entity.LocationEntity;
import com.lxc.domain.docker.model.entity.UpstreamEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author lxc18
 * @date 2024/12/29 10:17
 * @description NginxConfig
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NginxConfig {
    private String applicationName;
    private String nginxName;
    private String localNginxPath;
    private String remoteNginxPath;
    /** 负载均衡列表 */
    private List<UpstreamEntity> upstreamList;
    /** 反向代理列表 */
    private List<LocationEntity> locationList;
    public NginxConfig(List<UpstreamEntity> upstreamList, List<LocationEntity> locationList) {
        this.applicationName = "api-gateway-center";
        this.nginxName = "Nginx";
        this.localNginxPath = "C:\\Users\\lxc18\\IdeaProjects\\api-gateway-center\\api-gateway-center\\docs\\dev-ops\\nginx\\nginx.conf";
        this.remoteNginxPath = "/etc/nginx/";
        this.upstreamList = upstreamList;
        this.locationList = locationList;
    }

}
